package com.dk.controller;


import com.dk.service.DepartmentService;
import com.dk.vo.DepartmentVO;
import com.dongdongshop.data.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author wbh
 * @since 2023-03-22
 */
@RestController
@RequestMapping("department")
public class DepartmentController {

    @Autowired
    private DepartmentService departmentService;

    @GetMapping("getInfoList")
    public Result getInfoList(String departmentName){
        List<DepartmentVO> infoList = departmentService.getInfoList(departmentName);
        return Result.OK().setData(infoList);
    }

}

